package com.pattern.design.designpattern.Factory;

/**
 * author:harisucici on 2018/10/9 11:31
 * email:harisucici@gmail.com
 * name:
 * todo:
 */
public class AudiCarFactory extends AudiFactory {
    @Override
    public <T extends AudiCar> T creatAudiCar(Class<T> clz) {
        AudiCar car = null;
        try{
            car = (AudiCar)Class.forName(clz.getName()).newInstance();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return (T) car;
    }
}
